Integrand size = 35, antiderivative size = 228 \[ \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))^3}{(a+a \sin (e+f x))^2} \, dx=\frac {d \left (2 A (3 c-2 d) d+B \left (6 c^2-12 c d+7 d^2\right )\right ) x}{2 a^2}+\frac {2 d \left (A \left (c^2+6 c d-5 d^2\right )+B \left (2 c^2-15 c d+8 d^2\right )\right ) \cos (e+f x)}{3 a^2 f}+\frac {d^2 (B (4 c-21 d)+2 A (c+6 d)) \cos (e+f x) \sin (e+f x)}{6 a^2 f}-\frac {(2 B (c-4 d)+A (c+5 d)) \cos (e+f x) (c+d \sin (e+f x))^2}{3 a^2 f (1+\sin (e+f x))}-\frac {(A-B) \cos (e+f x) (c+d \sin (e+f x))^3}{3 f (a+a \sin (e+f x))^2} \]
1/2*d*(2*A*(3*c-2*d)*d+B*(6*c^2-12*c*d+7*d^2))*x/a^2+2/3*d*(A*(c^2+6*c*d-5 *d^2)+B*(2*c^2-15*c*d+8*d^2))*cos(f*x+e)/a^2/f+1/6*d^2*(B*(4*c-21*d)+2*A*( c+6*d))*cos(f*x+e)*sin(f*x+e)/a^2/f-1/3*(2*B*(c-4*d)+A*(c+5*d))*cos(f*x+e) *(c+d*sin(f*x+e))^2/a^2/f/(1+sin(f*x+e))-1/3*(A-B)*cos(f*x+e)*(c+d*sin(f*x +e))^3/f/(a+a*sin(f*x+e))^2
Leaf count is larger than twice the leaf count of optimal. \(547\) vs. \(2(228)=456\).
Time = 2.41 (sec) , antiderivative size = 547, normalized size of antiderivative = 2.40 \[ \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))^3}{(a+a \sin (e+f x))^2} \, dx=\frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (3 \left (8 A d \left (6 c^2+d^2 (5-6 e-6 f x)+3 c d (-4+3 e+3 f x)\right )+B \left (16 c^3+24 c^2 d (-4+3 e+3 f x)-24 c d^2 (-5+6 e+6 f x)+7 d^3 (-7+12 e+12 f x)\right )\right ) \cos \left (\frac {1}{2} (e+f x)\right )-\left (4 A \left (4 c^3+24 c^2 d+d^3 (41-12 e-12 f x)+6 c d^2 (-10+3 e+3 f x)\right )+B \left (32 c^3+24 c^2 d (-10+3 e+3 f x)-12 c d^2 (-41+12 e+12 f x)+d^3 (-239+84 e+84 f x)\right )\right ) \cos \left (\frac {3}{2} (e+f x)\right )+3 \left (d^2 (12 B c+4 A d-5 B d) \cos \left (\frac {5}{2} (e+f x)\right )+B d^3 \cos \left (\frac {7}{2} (e+f x)\right )+2 \left (8 A c^3+8 B c^3+24 A c^2 d-72 B c^2 d-72 A c d^2+108 B c d^2+36 A d^3-50 B d^3+48 B c^2 d e+48 A c d^2 e-96 B c d^2 e-32 A d^3 e+56 B d^3 e+48 B c^2 d f x+48 A c d^2 f x-96 B c d^2 f x-32 A d^3 f x+56 B d^3 f x+d \left (8 A d (3 c (e+f x)-2 d (1+e+f x))+B \left (24 c^2 (e+f x)-48 c d (1+e+f x)+d^2 (27+28 e+28 f x)\right )\right ) \cos (e+f x)+2 d^2 (-6 B c-2 A d+3 B d) \cos (2 (e+f x))+B d^3 \cos (3 (e+f x))\right ) \sin \left (\frac {1}{2} (e+f x)\right )\right )\right )}{48 a^2 f (1+\sin (e+f x))^2} \]
((Cos[(e + f*x)/2] + Sin[(e + f*x)/2])*(3*(8*A*d*(6*c^2 + d^2*(5 - 6*e - 6 *f*x) + 3*c*d*(-4 + 3*e + 3*f*x)) + B*(16*c^3 + 24*c^2*d*(-4 + 3*e + 3*f*x ) - 24*c*d^2*(-5 + 6*e + 6*f*x) + 7*d^3*(-7 + 12*e + 12*f*x)))*Cos[(e + f* x)/2] - (4*A*(4*c^3 + 24*c^2*d + d^3*(41 - 12*e - 12*f*x) + 6*c*d^2*(-10 + 3*e + 3*f*x)) + B*(32*c^3 + 24*c^2*d*(-10 + 3*e + 3*f*x) - 12*c*d^2*(-41 + 12*e + 12*f*x) + d^3*(-239 + 84*e + 84*f*x)))*Cos[(3*(e + f*x))/2] + 3*( d^2*(12*B*c + 4*A*d - 5*B*d)*Cos[(5*(e + f*x))/2] + B*d^3*Cos[(7*(e + f*x) )/2] + 2*(8*A*c^3 + 8*B*c^3 + 24*A*c^2*d - 72*B*c^2*d - 72*A*c*d^2 + 108*B *c*d^2 + 36*A*d^3 - 50*B*d^3 + 48*B*c^2*d*e + 48*A*c*d^2*e - 96*B*c*d^2*e - 32*A*d^3*e + 56*B*d^3*e + 48*B*c^2*d*f*x + 48*A*c*d^2*f*x - 96*B*c*d^2*f *x - 32*A*d^3*f*x + 56*B*d^3*f*x + d*(8*A*d*(3*c*(e + f*x) - 2*d*(1 + e + f*x)) + B*(24*c^2*(e + f*x) - 48*c*d*(1 + e + f*x) + d^2*(27 + 28*e + 28*f *x)))*Cos[e + f*x] + 2*d^2*(-6*B*c - 2*A*d + 3*B*d)*Cos[2*(e + f*x)] + B*d ^3*Cos[3*(e + f*x)])*Sin[(e + f*x)/2])))/(48*a^2*f*(1 + Sin[e + f*x])^2)
Time = 0.87 (sec) , antiderivative size = 234, normalized size of antiderivative = 1.03, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.171, Rules used = {3042, 3456, 3042, 3456, 3042, 3213}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))^3}{(a \sin (e+f x)+a)^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))^3}{(a \sin (e+f x)+a)^2}dx\) |
\(\Big \downarrow \) 3456 |
\(\displaystyle \frac {\int \frac {(c+d \sin (e+f x))^2 (a (A c+2 B c+3 A d-3 B d)-a (2 A-5 B) d \sin (e+f x))}{\sin (e+f x) a+a}dx}{3 a^2}-\frac {(A-B) \cos (e+f x) (c+d \sin (e+f x))^3}{3 f (a \sin (e+f x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {(c+d \sin (e+f x))^2 (a (A c+2 B c+3 A d-3 B d)-a (2 A-5 B) d \sin (e+f x))}{\sin (e+f x) a+a}dx}{3 a^2}-\frac {(A-B) \cos (e+f x) (c+d \sin (e+f x))^3}{3 f (a \sin (e+f x)+a)^2}\) |
\(\Big \downarrow \) 3456 |
\(\displaystyle \frac {\frac {\int (c+d \sin (e+f x)) \left (a^2 d (9 B c+10 A d-16 B d)-a^2 d (B (4 c-21 d)+2 A (c+6 d)) \sin (e+f x)\right )dx}{a^2}-\frac {(A (c+5 d)+2 B (c-4 d)) \cos (e+f x) (c+d \sin (e+f x))^2}{f (\sin (e+f x)+1)}}{3 a^2}-\frac {(A-B) \cos (e+f x) (c+d \sin (e+f x))^3}{3 f (a \sin (e+f x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int (c+d \sin (e+f x)) \left (a^2 d (9 B c+10 A d-16 B d)-a^2 d (B (4 c-21 d)+2 A (c+6 d)) \sin (e+f x)\right )dx}{a^2}-\frac {(A (c+5 d)+2 B (c-4 d)) \cos (e+f x) (c+d \sin (e+f x))^2}{f (\sin (e+f x)+1)}}{3 a^2}-\frac {(A-B) \cos (e+f x) (c+d \sin (e+f x))^3}{3 f (a \sin (e+f x)+a)^2}\) |
\(\Big \downarrow \) 3213 |
\(\displaystyle \frac {\frac {\frac {2 a^2 d \left (A \left (c^2+6 c d-5 d^2\right )+B \left (2 c^2-15 c d+8 d^2\right )\right ) \cos (e+f x)}{f}+\frac {3}{2} a^2 d x \left (2 A d (3 c-2 d)+B \left (6 c^2-12 c d+7 d^2\right )\right )+\frac {a^2 d^2 (2 A (c+6 d)+B (4 c-21 d)) \sin (e+f x) \cos (e+f x)}{2 f}}{a^2}-\frac {(A (c+5 d)+2 B (c-4 d)) \cos (e+f x) (c+d \sin (e+f x))^2}{f (\sin (e+f x)+1)}}{3 a^2}-\frac {(A-B) \cos (e+f x) (c+d \sin (e+f x))^3}{3 f (a \sin (e+f x)+a)^2}\) |
-1/3*((A - B)*Cos[e + f*x]*(c + d*Sin[e + f*x])^3)/(f*(a + a*Sin[e + f*x]) ^2) + (-(((2*B*(c - 4*d) + A*(c + 5*d))*Cos[e + f*x]*(c + d*Sin[e + f*x])^ 2)/(f*(1 + Sin[e + f*x]))) + ((3*a^2*d*(2*A*(3*c - 2*d)*d + B*(6*c^2 - 12* c*d + 7*d^2))*x)/2 + (2*a^2*d*(A*(c^2 + 6*c*d - 5*d^2) + B*(2*c^2 - 15*c*d + 8*d^2))*Cos[e + f*x])/f + (a^2*d^2*(B*(4*c - 21*d) + 2*A*(c + 6*d))*Cos [e + f*x]*Sin[e + f*x])/(2*f))/a^2)/(3*a^2)
3.3.72.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.) *(x_)]), x_Symbol] :> Simp[(2*a*c + b*d)*(x/2), x] + (-Simp[(b*c + a*d)*(Co s[e + f*x]/f), x] - Simp[b*d*Cos[e + f*x]*(Sin[e + f*x]/(2*f)), x]) /; Free Q[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[(A*b - a*B)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^n/( a*f*(2*m + 1))), x] - Simp[1/(a*b*(2*m + 1)) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^(n - 1)*Simp[A*(a*d*n - b*c*(m + 1)) - B*(a*c*m + b*d*n) - d*(a*B*(m - n) + A*b*(m + n + 1))*Sin[e + f*x], x], x], x] /; Fre eQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] & & NeQ[c^2 - d^2, 0] && LtQ[m, -2^(-1)] && GtQ[n, 0] && IntegerQ[2*m] && (In tegerQ[2*n] || EqQ[c, 0])
Time = 1.05 (sec) , antiderivative size = 340, normalized size of antiderivative = 1.49
method | result | size |
derivativedivides | \(\frac {-\frac {2 \left (A \,c^{3}-3 d^{2} c A +2 A \,d^{3}-3 c^{2} d B +6 d^{2} c B -3 d^{3} B \right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\frac {-2 A \,c^{3}+6 c^{2} d A -6 d^{2} c A +2 A \,d^{3}+2 B \,c^{3}-6 c^{2} d B +6 d^{2} c B -2 d^{3} B}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}-\frac {2 \left (2 A \,c^{3}-6 c^{2} d A +6 d^{2} c A -2 A \,d^{3}-2 B \,c^{3}+6 c^{2} d B -6 d^{2} c B +2 d^{3} B \right )}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}+2 d \left (\frac {\frac {B \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right ) d^{2}}{2}+\left (-A \,d^{2}-3 c d B +2 d^{2} B \right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )-\frac {B \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) d^{2}}{2}-A \,d^{2}-3 c d B +2 d^{2} B}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{2}}+\frac {\left (6 A c d -4 A \,d^{2}+6 B \,c^{2}-12 c d B +7 d^{2} B \right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}\right )}{a^{2} f}\) | \(340\) |
default | \(\frac {-\frac {2 \left (A \,c^{3}-3 d^{2} c A +2 A \,d^{3}-3 c^{2} d B +6 d^{2} c B -3 d^{3} B \right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\frac {-2 A \,c^{3}+6 c^{2} d A -6 d^{2} c A +2 A \,d^{3}+2 B \,c^{3}-6 c^{2} d B +6 d^{2} c B -2 d^{3} B}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}-\frac {2 \left (2 A \,c^{3}-6 c^{2} d A +6 d^{2} c A -2 A \,d^{3}-2 B \,c^{3}+6 c^{2} d B -6 d^{2} c B +2 d^{3} B \right )}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}+2 d \left (\frac {\frac {B \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right ) d^{2}}{2}+\left (-A \,d^{2}-3 c d B +2 d^{2} B \right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )-\frac {B \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) d^{2}}{2}-A \,d^{2}-3 c d B +2 d^{2} B}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{2}}+\frac {\left (6 A c d -4 A \,d^{2}+6 B \,c^{2}-12 c d B +7 d^{2} B \right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}\right )}{a^{2} f}\) | \(340\) |
parallelrisch | \(\frac {\left (\left (720 f x A -1260 f x B +696 A -993 B \right ) d^{3}-1080 \left (f x A -2 f x B +\frac {7}{15} A -\frac {29}{15} B \right ) c \,d^{2}-72 c^{2} \left (15 f x B +A +7 B \right ) d +216 \left (A -\frac {B}{9}\right ) c^{3}\right ) \cos \left (\frac {f x}{2}+\frac {e}{2}\right )+\left (\left (-240 f x A +420 f x B +388 A -619 B \right ) d^{3}+360 c \left (f x A -2 f x B -\frac {23}{15} A +\frac {97}{30} B \right ) d^{2}+264 c^{2} \left (\frac {15}{11} f x B +A -\frac {23}{11} B \right ) d +8 c^{3} \left (A +11 B \right )\right ) \cos \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )+\left (\left (720 f x A -1260 f x B -24 A +177 B \right ) d^{3}-1080 \left (f x A -2 f x B -\frac {1}{5} A +\frac {1}{15} B \right ) c \,d^{2}-72 c^{2} \left (15 f x B +A -3 B \right ) d -24 c^{3} \left (A +B \right )\right ) \sin \left (\frac {f x}{2}+\frac {e}{2}\right )+\left (\left (240 f x A -420 f x B +612 A -891 B \right ) d^{3}-360 c \left (f x A -2 f x B +\frac {9}{5} A -\frac {51}{10} B \right ) d^{2}+216 \left (-\frac {5}{3} f x B +A -3 B \right ) c^{2} d +72 c^{3} \left (A +B \right )\right ) \sin \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )-60 \left (\left (\left (A -\frac {5 B}{4}\right ) d +3 B c \right ) \cos \left (\frac {5 f x}{2}+\frac {5 e}{2}\right )+\left (\left (-A +\frac {5 B}{4}\right ) d -3 B c \right ) \sin \left (\frac {5 f x}{2}+\frac {5 e}{2}\right )+\frac {d B \left (\cos \left (\frac {7 f x}{2}+\frac {7 e}{2}\right )+\sin \left (\frac {7 f x}{2}+\frac {7 e}{2}\right )\right )}{4}\right ) d^{2}}{120 f \,a^{2} \left (-3 \cos \left (\frac {f x}{2}+\frac {e}{2}\right )+\cos \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )-\sin \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )-3 \sin \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}\) | \(446\) |
risch | \(\frac {3 x \,d^{2} A c}{a^{2}}-\frac {2 x \,d^{3} A}{a^{2}}+\frac {3 x d B \,c^{2}}{a^{2}}-\frac {6 x \,d^{2} c B}{a^{2}}+\frac {7 x \,d^{3} B}{2 a^{2}}+\frac {i d^{3} B \,{\mathrm e}^{2 i \left (f x +e \right )}}{8 a^{2} f}-\frac {d^{3} {\mathrm e}^{i \left (f x +e \right )} A}{2 a^{2} f}-\frac {3 d^{2} {\mathrm e}^{i \left (f x +e \right )} B c}{2 a^{2} f}+\frac {d^{3} {\mathrm e}^{i \left (f x +e \right )} B}{a^{2} f}-\frac {d^{3} {\mathrm e}^{-i \left (f x +e \right )} A}{2 a^{2} f}-\frac {3 d^{2} {\mathrm e}^{-i \left (f x +e \right )} B c}{2 a^{2} f}+\frac {d^{3} {\mathrm e}^{-i \left (f x +e \right )} B}{a^{2} f}-\frac {i d^{3} B \,{\mathrm e}^{-2 i \left (f x +e \right )}}{8 a^{2} f}-\frac {2 \left (-6 c^{2} d A +15 d^{2} c A +15 c^{2} d B -24 d^{2} c B +9 i A \,c^{2} d \,{\mathrm e}^{i \left (f x +e \right )}+3 i B \,c^{3} {\mathrm e}^{i \left (f x +e \right )}-27 i B \,c^{2} d \,{\mathrm e}^{i \left (f x +e \right )}-18 A c \,d^{2} {\mathrm e}^{2 i \left (f x +e \right )}-18 B \,c^{2} d \,{\mathrm e}^{2 i \left (f x +e \right )}+11 d^{3} B +27 B c \,d^{2} {\mathrm e}^{2 i \left (f x +e \right )}+9 A \,d^{3} {\mathrm e}^{2 i \left (f x +e \right )}-12 B \,d^{3} {\mathrm e}^{2 i \left (f x +e \right )}-A \,c^{3}-2 B \,c^{3}+3 B \,c^{3} {\mathrm e}^{2 i \left (f x +e \right )}+15 i A \,d^{3} {\mathrm e}^{i \left (f x +e \right )}+45 i B c \,d^{2} {\mathrm e}^{i \left (f x +e \right )}-21 i B \,d^{3} {\mathrm e}^{i \left (f x +e \right )}+3 i A \,c^{3} {\mathrm e}^{i \left (f x +e \right )}-27 i A c \,d^{2} {\mathrm e}^{i \left (f x +e \right )}+9 A \,c^{2} d \,{\mathrm e}^{2 i \left (f x +e \right )}-8 A \,d^{3}\right )}{3 f \,a^{2} \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )^{3}}\) | \(541\) |
norman | \(\text {Expression too large to display}\) | \(1351\) |
2/f/a^2*(-(A*c^3-3*A*c*d^2+2*A*d^3-3*B*c^2*d+6*B*c*d^2-3*B*d^3)/(tan(1/2*f *x+1/2*e)+1)-1/2*(-2*A*c^3+6*A*c^2*d-6*A*c*d^2+2*A*d^3+2*B*c^3-6*B*c^2*d+6 *B*c*d^2-2*B*d^3)/(tan(1/2*f*x+1/2*e)+1)^2-1/3*(2*A*c^3-6*A*c^2*d+6*A*c*d^ 2-2*A*d^3-2*B*c^3+6*B*c^2*d-6*B*c*d^2+2*B*d^3)/(tan(1/2*f*x+1/2*e)+1)^3+d* ((1/2*B*tan(1/2*f*x+1/2*e)^3*d^2+(-A*d^2-3*B*c*d+2*B*d^2)*tan(1/2*f*x+1/2* e)^2-1/2*B*tan(1/2*f*x+1/2*e)*d^2-A*d^2-3*c*d*B+2*d^2*B)/(1+tan(1/2*f*x+1/ 2*e)^2)^2+1/2*(6*A*c*d-4*A*d^2+6*B*c^2-12*B*c*d+7*B*d^2)*arctan(tan(1/2*f* x+1/2*e))))
Leaf count of result is larger than twice the leaf count of optimal. 584 vs. \(2 (218) = 436\).
Time = 0.27 (sec) , antiderivative size = 584, normalized size of antiderivative = 2.56 \[ \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))^3}{(a+a \sin (e+f x))^2} \, dx=-\frac {3 \, B d^{3} \cos \left (f x + e\right )^{4} - 2 \, {\left (A - B\right )} c^{3} + 6 \, {\left (A - B\right )} c^{2} d - 6 \, {\left (A - B\right )} c d^{2} + 2 \, {\left (A - B\right )} d^{3} + 6 \, {\left (3 \, B c d^{2} + {\left (A - B\right )} d^{3}\right )} \cos \left (f x + e\right )^{3} + 6 \, {\left (6 \, B c^{2} d + 6 \, {\left (A - 2 \, B\right )} c d^{2} - {\left (4 \, A - 7 \, B\right )} d^{3}\right )} f x - {\left (2 \, {\left (A + 2 \, B\right )} c^{3} + 6 \, {\left (2 \, A - 5 \, B\right )} c^{2} d - 6 \, {\left (5 \, A - 11 \, B\right )} c d^{2} + {\left (22 \, A - 31 \, B\right )} d^{3} + 3 \, {\left (6 \, B c^{2} d + 6 \, {\left (A - 2 \, B\right )} c d^{2} - {\left (4 \, A - 7 \, B\right )} d^{3}\right )} f x\right )} \cos \left (f x + e\right )^{2} - {\left (2 \, {\left (2 \, A + B\right )} c^{3} + 6 \, {\left (A - 4 \, B\right )} c^{2} d - 6 \, {\left (4 \, A - 13 \, B\right )} c d^{2} + 2 \, {\left (13 \, A - 19 \, B\right )} d^{3} - 3 \, {\left (6 \, B c^{2} d + 6 \, {\left (A - 2 \, B\right )} c d^{2} - {\left (4 \, A - 7 \, B\right )} d^{3}\right )} f x\right )} \cos \left (f x + e\right ) + {\left (3 \, B d^{3} \cos \left (f x + e\right )^{3} + 2 \, {\left (A - B\right )} c^{3} - 6 \, {\left (A - B\right )} c^{2} d + 6 \, {\left (A - B\right )} c d^{2} - 2 \, {\left (A - B\right )} d^{3} + 6 \, {\left (6 \, B c^{2} d + 6 \, {\left (A - 2 \, B\right )} c d^{2} - {\left (4 \, A - 7 \, B\right )} d^{3}\right )} f x - 3 \, {\left (6 \, B c d^{2} + {\left (2 \, A - 3 \, B\right )} d^{3}\right )} \cos \left (f x + e\right )^{2} - {\left (2 \, {\left (A + 2 \, B\right )} c^{3} + 6 \, {\left (2 \, A - 5 \, B\right )} c^{2} d - 6 \, {\left (5 \, A - 14 \, B\right )} c d^{2} + 4 \, {\left (7 \, A - 10 \, B\right )} d^{3} - 3 \, {\left (6 \, B c^{2} d + 6 \, {\left (A - 2 \, B\right )} c d^{2} - {\left (4 \, A - 7 \, B\right )} d^{3}\right )} f x\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{6 \, {\left (a^{2} f \cos \left (f x + e\right )^{2} - a^{2} f \cos \left (f x + e\right ) - 2 \, a^{2} f - {\left (a^{2} f \cos \left (f x + e\right ) + 2 \, a^{2} f\right )} \sin \left (f x + e\right )\right )}} \]
-1/6*(3*B*d^3*cos(f*x + e)^4 - 2*(A - B)*c^3 + 6*(A - B)*c^2*d - 6*(A - B) *c*d^2 + 2*(A - B)*d^3 + 6*(3*B*c*d^2 + (A - B)*d^3)*cos(f*x + e)^3 + 6*(6 *B*c^2*d + 6*(A - 2*B)*c*d^2 - (4*A - 7*B)*d^3)*f*x - (2*(A + 2*B)*c^3 + 6 *(2*A - 5*B)*c^2*d - 6*(5*A - 11*B)*c*d^2 + (22*A - 31*B)*d^3 + 3*(6*B*c^2 *d + 6*(A - 2*B)*c*d^2 - (4*A - 7*B)*d^3)*f*x)*cos(f*x + e)^2 - (2*(2*A + B)*c^3 + 6*(A - 4*B)*c^2*d - 6*(4*A - 13*B)*c*d^2 + 2*(13*A - 19*B)*d^3 - 3*(6*B*c^2*d + 6*(A - 2*B)*c*d^2 - (4*A - 7*B)*d^3)*f*x)*cos(f*x + e) + (3 *B*d^3*cos(f*x + e)^3 + 2*(A - B)*c^3 - 6*(A - B)*c^2*d + 6*(A - B)*c*d^2 - 2*(A - B)*d^3 + 6*(6*B*c^2*d + 6*(A - 2*B)*c*d^2 - (4*A - 7*B)*d^3)*f*x - 3*(6*B*c*d^2 + (2*A - 3*B)*d^3)*cos(f*x + e)^2 - (2*(A + 2*B)*c^3 + 6*(2 *A - 5*B)*c^2*d - 6*(5*A - 14*B)*c*d^2 + 4*(7*A - 10*B)*d^3 - 3*(6*B*c^2*d + 6*(A - 2*B)*c*d^2 - (4*A - 7*B)*d^3)*f*x)*cos(f*x + e))*sin(f*x + e))/( a^2*f*cos(f*x + e)^2 - a^2*f*cos(f*x + e) - 2*a^2*f - (a^2*f*cos(f*x + e) + 2*a^2*f)*sin(f*x + e))
Leaf count of result is larger than twice the leaf count of optimal. 14612 vs. \(2 (216) = 432\).
Time = 7.60 (sec) , antiderivative size = 14612, normalized size of antiderivative = 64.09 \[ \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))^3}{(a+a \sin (e+f x))^2} \, dx=\text {Too large to display} \]
Piecewise((-12*A*c**3*tan(e/2 + f*x/2)**6/(6*a**2*f*tan(e/2 + f*x/2)**7 + 18*a**2*f*tan(e/2 + f*x/2)**6 + 30*a**2*f*tan(e/2 + f*x/2)**5 + 42*a**2*f* tan(e/2 + f*x/2)**4 + 42*a**2*f*tan(e/2 + f*x/2)**3 + 30*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) - 12*A*c**3*tan(e/2 + f *x/2)**5/(6*a**2*f*tan(e/2 + f*x/2)**7 + 18*a**2*f*tan(e/2 + f*x/2)**6 + 3 0*a**2*f*tan(e/2 + f*x/2)**5 + 42*a**2*f*tan(e/2 + f*x/2)**4 + 42*a**2*f*t an(e/2 + f*x/2)**3 + 30*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f *x/2) + 6*a**2*f) - 32*A*c**3*tan(e/2 + f*x/2)**4/(6*a**2*f*tan(e/2 + f*x/ 2)**7 + 18*a**2*f*tan(e/2 + f*x/2)**6 + 30*a**2*f*tan(e/2 + f*x/2)**5 + 42 *a**2*f*tan(e/2 + f*x/2)**4 + 42*a**2*f*tan(e/2 + f*x/2)**3 + 30*a**2*f*ta n(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) - 24*A*c**3*tan (e/2 + f*x/2)**3/(6*a**2*f*tan(e/2 + f*x/2)**7 + 18*a**2*f*tan(e/2 + f*x/2 )**6 + 30*a**2*f*tan(e/2 + f*x/2)**5 + 42*a**2*f*tan(e/2 + f*x/2)**4 + 42* a**2*f*tan(e/2 + f*x/2)**3 + 30*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan (e/2 + f*x/2) + 6*a**2*f) - 28*A*c**3*tan(e/2 + f*x/2)**2/(6*a**2*f*tan(e/ 2 + f*x/2)**7 + 18*a**2*f*tan(e/2 + f*x/2)**6 + 30*a**2*f*tan(e/2 + f*x/2) **5 + 42*a**2*f*tan(e/2 + f*x/2)**4 + 42*a**2*f*tan(e/2 + f*x/2)**3 + 30*a **2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) - 12*A* c**3*tan(e/2 + f*x/2)/(6*a**2*f*tan(e/2 + f*x/2)**7 + 18*a**2*f*tan(e/2 + f*x/2)**6 + 30*a**2*f*tan(e/2 + f*x/2)**5 + 42*a**2*f*tan(e/2 + f*x/2)*...
Leaf count of result is larger than twice the leaf count of optimal. 1382 vs. \(2 (218) = 436\).
Time = 0.36 (sec) , antiderivative size = 1382, normalized size of antiderivative = 6.06 \[ \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))^3}{(a+a \sin (e+f x))^2} \, dx=\text {Too large to display} \]
1/3*(B*d^3*((75*sin(f*x + e)/(cos(f*x + e) + 1) + 97*sin(f*x + e)^2/(cos(f *x + e) + 1)^2 + 126*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 98*sin(f*x + e) ^4/(cos(f*x + e) + 1)^4 + 63*sin(f*x + e)^5/(cos(f*x + e) + 1)^5 + 21*sin( f*x + e)^6/(cos(f*x + e) + 1)^6 + 32)/(a^2 + 3*a^2*sin(f*x + e)/(cos(f*x + e) + 1) + 5*a^2*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 7*a^2*sin(f*x + e)^ 3/(cos(f*x + e) + 1)^3 + 7*a^2*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 5*a^2 *sin(f*x + e)^5/(cos(f*x + e) + 1)^5 + 3*a^2*sin(f*x + e)^6/(cos(f*x + e) + 1)^6 + a^2*sin(f*x + e)^7/(cos(f*x + e) + 1)^7) + 21*arctan(sin(f*x + e) /(cos(f*x + e) + 1))/a^2) - 12*B*c*d^2*((12*sin(f*x + e)/(cos(f*x + e) + 1 ) + 11*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 9*sin(f*x + e)^3/(cos(f*x + e ) + 1)^3 + 3*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 5)/(a^2 + 3*a^2*sin(f*x + e)/(cos(f*x + e) + 1) + 4*a^2*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 4*a ^2*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 3*a^2*sin(f*x + e)^4/(cos(f*x + e ) + 1)^4 + a^2*sin(f*x + e)^5/(cos(f*x + e) + 1)^5) + 3*arctan(sin(f*x + e )/(cos(f*x + e) + 1))/a^2) - 4*A*d^3*((12*sin(f*x + e)/(cos(f*x + e) + 1) + 11*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 9*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 3*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 5)/(a^2 + 3*a^2*sin(f*x + e)/(cos(f*x + e) + 1) + 4*a^2*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 4*a^2 *sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 3*a^2*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + a^2*sin(f*x + e)^5/(cos(f*x + e) + 1)^5) + 3*arctan(sin(f*x + ...
Leaf count of result is larger than twice the leaf count of optimal. 472 vs. \(2 (218) = 436\).
Time = 0.32 (sec) , antiderivative size = 472, normalized size of antiderivative = 2.07 \[ \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))^3}{(a+a \sin (e+f x))^2} \, dx=\frac {\frac {3 \, {\left (6 \, B c^{2} d + 6 \, A c d^{2} - 12 \, B c d^{2} - 4 \, A d^{3} + 7 \, B d^{3}\right )} {\left (f x + e\right )}}{a^{2}} + \frac {6 \, {\left (B d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 6 \, B c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 2 \, A d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 4 \, B d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - B d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 6 \, B c d^{2} - 2 \, A d^{3} + 4 \, B d^{3}\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1\right )}^{2} a^{2}} - \frac {4 \, {\left (3 \, A c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 9 \, B c^{2} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 9 \, A c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 18 \, B c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 6 \, A d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 9 \, B d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 3 \, A c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 3 \, B c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 9 \, A c^{2} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 27 \, B c^{2} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 27 \, A c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 45 \, B c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 15 \, A d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 21 \, B d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 2 \, A c^{3} + B c^{3} + 3 \, A c^{2} d - 12 \, B c^{2} d - 12 \, A c d^{2} + 21 \, B c d^{2} + 7 \, A d^{3} - 10 \, B d^{3}\right )}}{a^{2} {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{3}}}{6 \, f} \]
1/6*(3*(6*B*c^2*d + 6*A*c*d^2 - 12*B*c*d^2 - 4*A*d^3 + 7*B*d^3)*(f*x + e)/ a^2 + 6*(B*d^3*tan(1/2*f*x + 1/2*e)^3 - 6*B*c*d^2*tan(1/2*f*x + 1/2*e)^2 - 2*A*d^3*tan(1/2*f*x + 1/2*e)^2 + 4*B*d^3*tan(1/2*f*x + 1/2*e)^2 - B*d^3*t an(1/2*f*x + 1/2*e) - 6*B*c*d^2 - 2*A*d^3 + 4*B*d^3)/((tan(1/2*f*x + 1/2*e )^2 + 1)^2*a^2) - 4*(3*A*c^3*tan(1/2*f*x + 1/2*e)^2 - 9*B*c^2*d*tan(1/2*f* x + 1/2*e)^2 - 9*A*c*d^2*tan(1/2*f*x + 1/2*e)^2 + 18*B*c*d^2*tan(1/2*f*x + 1/2*e)^2 + 6*A*d^3*tan(1/2*f*x + 1/2*e)^2 - 9*B*d^3*tan(1/2*f*x + 1/2*e)^ 2 + 3*A*c^3*tan(1/2*f*x + 1/2*e) + 3*B*c^3*tan(1/2*f*x + 1/2*e) + 9*A*c^2* d*tan(1/2*f*x + 1/2*e) - 27*B*c^2*d*tan(1/2*f*x + 1/2*e) - 27*A*c*d^2*tan( 1/2*f*x + 1/2*e) + 45*B*c*d^2*tan(1/2*f*x + 1/2*e) + 15*A*d^3*tan(1/2*f*x + 1/2*e) - 21*B*d^3*tan(1/2*f*x + 1/2*e) + 2*A*c^3 + B*c^3 + 3*A*c^2*d - 1 2*B*c^2*d - 12*A*c*d^2 + 21*B*c*d^2 + 7*A*d^3 - 10*B*d^3)/(a^2*(tan(1/2*f* x + 1/2*e) + 1)^3))/f
Time = 17.17 (sec) , antiderivative size = 663, normalized size of antiderivative = 2.91 \[ \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))^3}{(a+a \sin (e+f x))^2} \, dx=\frac {d\,\mathrm {atan}\left (\frac {d\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (6\,B\,c^2-4\,A\,d^2+7\,B\,d^2+6\,A\,c\,d-12\,B\,c\,d\right )}{7\,B\,d^3-4\,A\,d^3+6\,A\,c\,d^2-12\,B\,c\,d^2+6\,B\,c^2\,d}\right )\,\left (6\,B\,c^2-4\,A\,d^2+7\,B\,d^2+6\,A\,c\,d-12\,B\,c\,d\right )}{a^2\,f}-\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (2\,A\,c^3+16\,A\,d^3+2\,B\,c^3-25\,B\,d^3-18\,A\,c\,d^2+6\,A\,c^2\,d+48\,B\,c\,d^2-18\,B\,c^2\,d\right )+\frac {4\,A\,c^3}{3}+\frac {20\,A\,d^3}{3}+\frac {2\,B\,c^3}{3}-\frac {32\,B\,d^3}{3}+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (2\,A\,c^3+4\,A\,d^3-7\,B\,d^3-6\,A\,c\,d^2+12\,B\,c\,d^2-6\,B\,c^2\,d\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5\,\left (2\,A\,c^3+12\,A\,d^3+2\,B\,c^3-21\,B\,d^3-18\,A\,c\,d^2+6\,A\,c^2\,d+36\,B\,c\,d^2-18\,B\,c^2\,d\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (4\,A\,c^3+28\,A\,d^3+4\,B\,c^3-42\,B\,d^3-36\,A\,c\,d^2+12\,A\,c^2\,d+84\,B\,c\,d^2-36\,B\,c^2\,d\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (\frac {16\,A\,c^3}{3}+\frac {56\,A\,d^3}{3}+\frac {2\,B\,c^3}{3}-\frac {98\,B\,d^3}{3}-20\,A\,c\,d^2+2\,A\,c^2\,d+56\,B\,c\,d^2-20\,B\,c^2\,d\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {14\,A\,c^3}{3}+\frac {64\,A\,d^3}{3}+\frac {4\,B\,c^3}{3}-\frac {97\,B\,d^3}{3}-22\,A\,c\,d^2+4\,A\,c^2\,d+64\,B\,c\,d^2-22\,B\,c^2\,d\right )-8\,A\,c\,d^2+2\,A\,c^2\,d+20\,B\,c\,d^2-8\,B\,c^2\,d}{f\,\left (a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7+3\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+5\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5+7\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+7\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+5\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+3\,a^2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+a^2\right )} \]
(d*atan((d*tan(e/2 + (f*x)/2)*(6*B*c^2 - 4*A*d^2 + 7*B*d^2 + 6*A*c*d - 12* B*c*d))/(7*B*d^3 - 4*A*d^3 + 6*A*c*d^2 - 12*B*c*d^2 + 6*B*c^2*d))*(6*B*c^2 - 4*A*d^2 + 7*B*d^2 + 6*A*c*d - 12*B*c*d))/(a^2*f) - (tan(e/2 + (f*x)/2)* (2*A*c^3 + 16*A*d^3 + 2*B*c^3 - 25*B*d^3 - 18*A*c*d^2 + 6*A*c^2*d + 48*B*c *d^2 - 18*B*c^2*d) + (4*A*c^3)/3 + (20*A*d^3)/3 + (2*B*c^3)/3 - (32*B*d^3) /3 + tan(e/2 + (f*x)/2)^6*(2*A*c^3 + 4*A*d^3 - 7*B*d^3 - 6*A*c*d^2 + 12*B* c*d^2 - 6*B*c^2*d) + tan(e/2 + (f*x)/2)^5*(2*A*c^3 + 12*A*d^3 + 2*B*c^3 - 21*B*d^3 - 18*A*c*d^2 + 6*A*c^2*d + 36*B*c*d^2 - 18*B*c^2*d) + tan(e/2 + ( f*x)/2)^3*(4*A*c^3 + 28*A*d^3 + 4*B*c^3 - 42*B*d^3 - 36*A*c*d^2 + 12*A*c^2 *d + 84*B*c*d^2 - 36*B*c^2*d) + tan(e/2 + (f*x)/2)^4*((16*A*c^3)/3 + (56*A *d^3)/3 + (2*B*c^3)/3 - (98*B*d^3)/3 - 20*A*c*d^2 + 2*A*c^2*d + 56*B*c*d^2 - 20*B*c^2*d) + tan(e/2 + (f*x)/2)^2*((14*A*c^3)/3 + (64*A*d^3)/3 + (4*B* c^3)/3 - (97*B*d^3)/3 - 22*A*c*d^2 + 4*A*c^2*d + 64*B*c*d^2 - 22*B*c^2*d) - 8*A*c*d^2 + 2*A*c^2*d + 20*B*c*d^2 - 8*B*c^2*d)/(f*(5*a^2*tan(e/2 + (f*x )/2)^2 + 7*a^2*tan(e/2 + (f*x)/2)^3 + 7*a^2*tan(e/2 + (f*x)/2)^4 + 5*a^2*t an(e/2 + (f*x)/2)^5 + 3*a^2*tan(e/2 + (f*x)/2)^6 + a^2*tan(e/2 + (f*x)/2)^ 7 + a^2 + 3*a^2*tan(e/2 + (f*x)/2)))